/*Soonpage Model*/
function SoonpageModel ($http) {
	function Soonpage(SoonpageData) {
		if(SoonpageData){
			this.setData(SoonpageData);
		}
	};
	Soonpage.prototype = {
		setData: function(SoonpageData) {
			angular.extend(this, SoonpageData);
		},		
        ajouterContactInvitation: function() {
            var promise = $http.post('/soonpage/Index/ajouterinvitation', this)
				.success(function (data, status, headers, config) {
					return data;
				})
				.error(function (data, status, headers, config) {
					return {"status": false};
				});
            
        	return promise;
        },
        ajouterDemandeFormulaireDeContact: function() {
            var promise = $http.post('/soonpage/Index/traiterformulairecontact', this)
				.success(function (data, status, headers, config) {
					return data;
				})
				.error(function (data, status, headers, config) {
					return {"status": false};
				});
            
        	return promise;
        },
	};
	return Soonpage;
}
